package com.github.ecbp.user.service.dto;

import com.github.ecbp.common.security.vo.DefaultUserDetails;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel
@Data
public class ButtonBo {

    /**
     * 菜单ID
     */
    @ApiModelProperty(value = "菜单ID")
    private Long menuId;

    /**
     * 是否查询当前用户下菜单/按钮
     */
    private Boolean authorityAccess = false;

    private DefaultUserDetails userDetails;

    public ButtonBo(Long menuId) {
        this.menuId = menuId;
        this.authorityAccess = false;
    }

    public ButtonBo(Long menuId, DefaultUserDetails userDetails) {
        this.menuId = menuId;
        this.userDetails = userDetails;
        this.authorityAccess = true;
    }
}
